<!doctype html>



  


<html class="theme-next pisces use-motion">
<head>
  <meta charset="UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"/>



<meta http-equiv="Cache-Control" content="no-transform" />
<meta http-equiv="Cache-Control" content="no-siteapp" />












  <link href="/vendors/fancybox/source/jquery.fancybox.css?v=2.1.5" rel="stylesheet" type="text/css"/>




  <link href="//fonts.googleapis.com/css?family=Lato:300,400,700,400italic&subset=latin,latin-ext" rel="stylesheet" type="text/css">



<link href="/vendors/font-awesome/css/font-awesome.min.css?v=4.4.0" rel="stylesheet" type="text/css" />

<link href="/css/main.css?v=5.0.0" rel="stylesheet" type="text/css" />


  <meta name="keywords" content="Hexo, NexT" />





  <link rel="alternate" href="/atom.xml" title="追背影的熊孩子" type="application/atom+xml" />




  <link rel="shortcut icon" type="image/x-icon" href="/favicon.ico?v=5.0.0" />






<meta name="description" content="在成为最厉害最厉害最厉害的道路上.">
<meta property="og:type" content="website">
<meta property="og:title" content="追背影的熊孩子">
<meta property="og:url" content="http://b.fengbl.cn/index.html">
<meta property="og:site_name" content="追背影的熊孩子">
<meta property="og:description" content="在成为最厉害最厉害最厉害的道路上.">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="追背影的熊孩子">
<meta name="twitter:description" content="在成为最厉害最厉害最厉害的道路上.">



<script type="text/javascript" id="hexo.configuration">
  var NexT = window.NexT || {};
  var CONFIG = {
    scheme: 'Pisces',
    sidebar: '[object Object]',
    fancybox: true,
    motion: true,
    duoshuo: {
      userId: 0,
      author: '博主'
    }
  };
</script>

  <title> 追背影的熊孩子 </title>
</head>

<body itemscope itemtype="http://schema.org/WebPage" lang="zh-Hans">

  



  <script type="text/javascript">
    var _hmt = _hmt || [];
    (function() {
      var hm = document.createElement("script");
      hm.src = "//hm.baidu.com/hm.js?132dfd4f90476131a6139e7cd32e426b";
      var s = document.getElementsByTagName("script")[0];
      s.parentNode.insertBefore(hm, s);
    })();
  </script>




  
  
    
  

  <div class="container one-collumn sidebar-position-left 
   page-home 
 ">
    <div class="headband"></div>

    <header id="header" class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-meta ">
  

  <div class="custom-logo-site-title">
    <a href="/"  class="brand" rel="start">
      <span class="logo-line-before"><i></i></span>
      <span class="site-title">追背影的熊孩子</span>
      <span class="logo-line-after"><i></i></span>
    </a>
  </div>
  <p class="site-subtitle">Notes & Stories</p>
</div>

<div class="site-nav-toggle">
  <button>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
    <span class="btn-bar"></span>
  </button>
</div>

<nav class="site-nav">
  

  
    <ul id="menu" class="menu menu-left">
      
        
        <li class="menu-item menu-item-home">
          <a href="/" rel="section">
            
              <i class="menu-item-icon fa fa-home fa-fw"></i> <br />
            
            首页
          </a>
        </li>
      
        
        <li class="menu-item menu-item-categories">
          <a href="/categories" rel="section">
            
              <i class="menu-item-icon fa fa-th fa-fw"></i> <br />
            
            分类
          </a>
        </li>
      
        
        <li class="menu-item menu-item-archives">
          <a href="/archives" rel="section">
            
              <i class="menu-item-icon fa fa-archive fa-fw"></i> <br />
            
            归档
          </a>
        </li>
      

      
      
      
        <li class="menu-item menu-item-search">
          <a href="#" class="st-search-show-outputs">
            
              <i class="menu-item-icon fa fa-search fa-fw"></i> <br />
            
            搜索
          </a>
        </li>
      
    </ul>
  

  
    <div class="site-search">
      
  <form class="site-search-form">
  <input type="text" id="st-search-input" class="st-search-input st-default-search-input" />
</form>

<script type="text/javascript">
  (function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){
    (w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t);
    e=d.getElementsByTagName(t)[0];s.async=1;s.src=u;e.parentNode.insertBefore(s,e);
  })(window,document,'script','//s.swiftypecdn.com/install/v2/st.js','_st');

  _st('install', 'T4o6Q_jTr-CKSx9X79oD','2.0.0');
</script>



    </div>
  
</nav>

 </div>
    </header>

    <main id="main" class="main">
      <div class="main-inner">
        <div class="content-wrap">
          <div id="content" class="content">
            
  <section id="posts" class="posts-expand">

    

    
    

    
      

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2016/01/16/php-this-self-static/" itemprop="url">
                  PHP:this、self、static的区别
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">发表于</span>
            <time itemprop="dateCreated" datetime="2016-01-16T11:07:00+08:00" content="2016-01-16">
              2016-01-16
            </time>
          </span>

          
            <span class="post-category" >
              &nbsp; | &nbsp;
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="https://schema.org/Thing">
                  <a href="/categories/PHP/" itemprop="url" rel="index">
                    <span itemprop="name">PHP</span>
                  </a>
                </span>

                
                

              
            </span>
          

          
            
              <span class="post-comments-count">
                &nbsp; | &nbsp;
                <a href="/2016/01/16/php-this-self-static/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2016/01/16/php-this-self-static/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          

          
          
        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <h3 id="thisselfstatic">this&#x3001;self&#x3001;static</h3><pre><code>&lt;?php
header(<span class="string">&quot;content-type:text/html;charset=utf-8&quot;</span>);
class Human{
 static public <span class="variable">$name</span> = <span class="string">&quot;&#x5C0F;&#x59B9;&quot;</span>;
 public <span class="variable">$height</span> = <span class="number">180</span>;
 static public function tell(){
 echo self::<span class="variable">$name</span>;//&#x9759;&#x6001;&#x65B9;&#x6CD5;&#x8C03;&#x7528;&#x9759;&#x6001;&#x5C5E;&#x6027;&#xFF0C;&#x4F7F;&#x7528;self&#x5173;&#x952E;&#x8BCD;
 //echo <span class="variable">$this-</span>&gt;height;//&#x9519;&#x3002;&#x9759;&#x6001;&#x65B9;&#x6CD5;&#x4E0D;&#x80FD;&#x8C03;&#x7528;&#x975E;&#x9759;&#x6001;&#x5C5E;&#x6027;
//&#x56E0;&#x4E3A; <span class="variable">$this</span>&#x4EE3;&#x8868;&#x5B9E;&#x4F8B;&#x5316;&#x5BF9;&#x8C61;&#xFF0C;&#x800C;&#x8FD9;&#x91CC;&#x662F;&#x7C7B;&#xFF0C;&#x4E0D;&#x77E5;&#x9053; <span class="variable">$this</span> &#x4EE3;&#x8868;&#x54EA;&#x4E2A;&#x5BF9;&#x8C61;
 }
 public function say(){
 echo self::<span class="variable">$name</span> . <span class="string">&quot;&#x6211;&#x8BF4;&#x8BDD;&#x4E86;&quot;</span>;
 //&#x666E;&#x901A;&#x65B9;&#x6CD5;&#x8C03;&#x7528;&#x9759;&#x6001;&#x5C5E;&#x6027;&#xFF0C;&#x540C;&#x6837;&#x4F7F;&#x7528;self&#x5173;&#x952E;&#x8BCD;
 echo <span class="variable">$this-</span>&gt;height;
 }
}
<span class="variable">$p1</span> = new Human();
<span class="variable">$p1-</span>&gt;say(); 
<span class="variable">$p1-</span>&gt;tell();//&#x5BF9;&#x8C61;&#x53EF;&#x4EE5;&#x8BBF;&#x95EE;&#x9759;&#x6001;&#x65B9;&#x6CD5;
echo <span class="variable">$p1</span>::<span class="variable">$name</span>;//&#x5BF9;&#x8C61;&#x8BBF;&#x95EE;&#x9759;&#x6001;&#x5C5E;&#x6027;&#x3002;&#x4E0D;&#x80FD;&#x8FD9;&#x4E48;&#x8BBF;&#x95EE;<span class="variable">$p1-</span>&gt;name
//&#x56E0;&#x4E3A;&#x9759;&#x6001;&#x5C5E;&#x6027;&#x7684;&#x5185;&#x5B58;&#x4F4D;&#x7F6E;&#x4E0D;&#x5728;&#x5BF9;&#x8C61;&#x91CC;
Human::say();//&#x9519;&#x3002;say()&#x65B9;&#x6CD5;&#x6709;<span class="variable">$this</span>&#x65F6;&#x51FA;&#x9519;&#xFF1B;&#x6CA1;&#x6709;<span class="variable">$this</span>&#x65F6;&#x80FD;&#x51FA;&#x7ED3;&#x679C;
//&#x4F46;php5.<span class="number">4</span>&#x4EE5;&#x4E0A;&#x4F1A;&#x63D0;&#x793A;
?&gt;
</code></pre><h4 id="&#x7ED3;&#x8BBA;">&#x7ED3;&#x8BBA;&#xFF1A;</h4><blockquote>
<p>&#xFF08;1&#xFF09;&#x3001;&#x9759;&#x6001;&#x5C5E;&#x6027;&#x4E0D;&#x9700;&#x8981;&#x5B9E;&#x4F8B;&#x5316;&#x5373;&#x53EF;&#x8C03;&#x7528;&#x3002;&#x56E0;&#x4E3A;&#x9759;&#x6001;&#x5C5E;&#x6027;&#x5B58;&#x653E;&#x7684;&#x4F4D;&#x7F6E;&#x662F;&#x5728;&#x7C7B;&#x91CC;&#xFF0C;&#x8C03;&#x7528;&#x65B9;&#x6CD5;&#x4E3A;&#x201D;&#x7C7B;&#x540D;::&#x5C5E;&#x6027;&#x540D;&#x201D;&#xFF1B;<br>&#xFF08;2&#xFF09;&#x3001;&#x9759;&#x6001;&#x65B9;&#x6CD5;&#x4E0D;&#x9700;&#x8981;&#x5B9E;&#x4F8B;&#x5316;&#x5373;&#x53EF;&#x8C03;&#x7528;&#x3002;&#x540C;&#x4E0A; &#xFF08;3&#xFF09;&#x3001;&#x9759;&#x6001;&#x65B9;&#x6CD5;&#x4E0D;&#x80FD;&#x8C03;&#x7528;&#x975E;&#x9759;&#x6001;&#x5C5E;&#x6027;&#x3002;&#x56E0;&#x4E3A;&#x975E;&#x9759;&#x6001;&#x5C5E;&#x6027;&#x9700;&#x8981;&#x5B9E;&#x4F8B;&#x5316;&#x540E;&#xFF0C;&#x5B58;&#x653E;&#x5728;&#x5BF9;&#x8C61;&#x91CC;&#xFF1B;<br>&#xFF08;4&#xFF09;&#x3001;&#x9759;&#x6001;&#x65B9;&#x6CD5;&#x53EF;&#x4EE5;&#x8C03;&#x7528;&#x975E;&#x9759;&#x6001;&#x65B9;&#x6CD5;&#xFF0C;&#x4F7F;&#x7528; self &#x5173;&#x952E;&#x8BCD;&#x3002;php&#x91CC;&#xFF0C;&#x4E00;&#x4E2A;&#x65B9;&#x6CD5;&#x88AB;self:: &#x540E;&#xFF0C;&#x5B83;&#x5C31;&#x81EA;&#x52A8;&#x8F6C;&#x53D8;&#x4E3A;&#x9759;&#x6001;&#x65B9;&#x6CD5;&#xFF1B;</p>
</blockquote>
<p><a href="http://www.jb51.net/article/60871.htm" target="_blank" rel="external">&#x539F;&#x6587;&#x94FE;&#x63A5;</a><br><a href="http://php.net/manual/zh/language.oop5.late-static-bindings.php" target="_blank" rel="external">&#x540E;&#x671F;&#x9759;&#x6001;&#x7ED1;&#x5B9A;: &#x53C2;&#x8003;&#x8D44;&#x6599;</a><br><a href="http://www.golaravel.com/php/language.oop5.paamayim-nekudotayim.html" target="_blank" rel="external">&#x201C;::&#x201D;&#x662F;&#x5565;</a></p>

          
        
      
    </div>

    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>



    
      

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2016/01/16/cm-summary/" itemprop="url">
                  CM玩耍技巧、踩坑集锦
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">发表于</span>
            <time itemprop="dateCreated" datetime="2016-01-16T08:19:00+08:00" content="2016-01-16">
              2016-01-16
            </time>
          </span>

          
            <span class="post-category" >
              &nbsp; | &nbsp;
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="https://schema.org/Thing">
                  <a href="/categories/mobile/" itemprop="url" rel="index">
                    <span itemprop="name">mobile</span>
                  </a>
                </span>

                
                

              
            </span>
          

          
            
              <span class="post-comments-count">
                &nbsp; | &nbsp;
                <a href="/2016/01/16/cm-summary/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2016/01/16/cm-summary/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          

          
          
        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>&#x9519;&#x8BEF;&#x63D0;&#x793A;&#xFF1A;<code>Read-only file system.</code></p>
<p>&#x89E3;&#x51B3;&#xFF1A;</p>
<p>Simply change ro to rw and add the remount option</p>
<pre><code><span class="preprocessor"># mount -o rw,remount /system</span>
</code></pre><p>Once you are done making changes, you should remount with the original readonly.</p>
<pre><code><span class="preprocessor"># mount -o ro,remount /system</span>
</code></pre><p><a href="http://stackoverflow.com/questions/6066030/read-only-file-system-on-android" target="_blank" rel="external">&#x539F;&#x6587;&#x94FE;&#x63A5;</a></p>
<h3 id="&#x66F4;&#x65B0;-hosts">&#x66F4;&#x65B0; Hosts</h3><p>wget -c <a href="http://smarthosts.googlecode.com/svn/trunk/hosts" target="_blank" rel="external">http://smarthosts.googlecode.com/svn/trunk/hosts</a> &gt;&gt; /etc/hosts</p>

          
        
      
    </div>

    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>



    
      

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2015/12/24/css_study_first_day/" itemprop="url">
                  CSS 学习笔记（一） ：选择器、
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">发表于</span>
            <time itemprop="dateCreated" datetime="2015-12-24T22:29:00+08:00" content="2015-12-24">
              2015-12-24
            </time>
          </span>

          
            <span class="post-category" >
              &nbsp; | &nbsp;
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="https://schema.org/Thing">
                  <a href="/categories/CSS/" itemprop="url" rel="index">
                    <span itemprop="name">CSS</span>
                  </a>
                </span>

                
                

              
            </span>
          

          
            
              <span class="post-comments-count">
                &nbsp; | &nbsp;
                <a href="/2015/12/24/css_study_first_day/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2015/12/24/css_study_first_day/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          

          
          
        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <ul>
<li>&#x884C;&#x5185;&#x5143;&#x7D20;&#xFF1A;</li>
<li>&#x66FF;&#x6362;&#x5143;&#x7D20;&#xFF1A;</li>
<li><p>&#x975E;&#x66FF;&#x6362;&#x5143;&#x7D20;</p>
<p><a href="http://blog.csdn.net/chenmoquan/article/details/44646369" target="_blank" rel="external">&#x4ECB;&#x7ECD;&#x94FE;&#x63A5;</a></p>
</li>
</ul>
<h3 id="&#x9009;&#x62E9;">&#x9009;&#x62E9;&#xFF1A;</h3><pre><code>body,<span class="keyword">table</span> {color:gray} <span class="comment">//&#x5206;&#x7EC4;&#x9009;&#x62E9;</span>
.warning.uragent {color:gray} <span class="comment">//&#x7C7B;&#x9009;&#x62E9;</span>
plate[moon]  {color:gray} <span class="comment">//&#x5305;&#x542B;moon&#x5C5E;&#x6027;&#x7684; palte</span>
h1 em  {color:gray} <span class="comment">//&#x7EE7;&#x627F;</span>

h1[<span class="keyword">class</span>*=<span class="string">&quot;test&quot;</span>] <span class="keyword">class</span> &#x5305;&#x542B; <span class="keyword">test</span> &#x7684; h1
h1[<span class="keyword">class</span>~=<span class="string">&quot;test&quot;</span>] <span class="keyword">class</span> &#x5305;&#x542B; <span class="keyword">test</span> &#x7684; h1
h1[<span class="keyword">class</span>$=<span class="string">&quot;test&quot;</span>] &#x4EE5; <span class="keyword">test</span> &#x7ED3;&#x5C3E;
h1[<span class="keyword">class</span>^=<span class="string">&quot;test&quot;</span>] &#x4EE5; <span class="keyword">test</span> &#x5F00;&#x5934;

p&gt;strong &#x9009;&#x62E9;&#x5B50;&#x5143;&#x7D20; strong <span class="comment">//&#x7236;&#x5B50;</span>
p+<span class="keyword">h</span> &#x9009;&#x62E9; p &#x540E;&#x9762;&#x7684; <span class="keyword">h</span> &#x5143;&#x7D20; <span class="comment">//&#x5144;&#x5F1F;</span>
a:visted <span class="comment">//&#x4F2A;&#x7C7B;</span>

:focus &#x7126;&#x70B9; :hover &#x9F20;&#x6807;&#x505C;&#x7559;&#xFF1A;active &#x70B9;&#x51FB;&#x540E;&#x6FC0;&#x6D3B;

<span class="keyword">li</span>:first-child <span class="comment">//&#x9009;&#x62E9;&#x4F5C;&#x4E3A;&#x7B2C;&#x4E00;&#x4E2A;&#x5B50;&#x5143;&#x7D20;&#x7684;li&#x5143;&#x7D20;</span>
</code></pre><p><a href="http://segmentfault.com/a/1190000000484493" target="_blank" rel="external">&#x4F2A;&#x5143;&#x7D20;&#x3001;&#x4F2A;&#x7C7B;&#x7684;&#x533A;&#x522B;</a></p>
<p>Mark : Page 63.</p>
<pre><code><span class="tag">h2</span><span class="pseudo">:before</span> {<span class="attribute">content</span>:<span class="string">&quot;abc&quot;</span>;<span class="attribute">color</span>:silver;} <span class="comment">//h2&#x4E4B;&#x524D;&#x6DFB;&#x52A0;&#x94F6;&#x8272;&#x7684; }}</span>
</code></pre><h3 id="&#x7ED3;&#x6784;&#x4E0E;&#x5C42;&#x53E0;">&#x7ED3;&#x6784;&#x4E0E;&#x5C42;&#x53E0;</h3><p>specificity&#x8BA1;&#x7B97;&#x65B9;&#x6CD5;&#xFF1A;</p>
<pre><code><span class="tag">h1</span> {<span class="attribute">color</span>:read !important;} <span class="comment">//&#x91CD;&#x8981;&#x6027;&#xFF0C;&#x52A0;&#x5728;&#x5206;&#x53F7;&#x524D;&#x3002;</span>
<span class="attribute">LVHA</span>
</code></pre><p><a href="http://blog.sina.com.cn/s/blog_4398c8d30100zht5.html" target="_blank" rel="external">&#x8BFB;&#x8005;&#x3001;&#x521B;&#x4F5C;&#x3001;&#x4EE3;&#x7406;&#x6837;&#x5F0F;
</a></p>
<h3 id="&#x503C;&#x5355;&#x4F4D;">&#x503C;&#x3001;&#x5355;&#x4F4D;</h3><h4 id="&#x5173;&#x952E;&#x5B57;">&#x5173;&#x952E;&#x5B57;&#xFF1A;</h4><p>&#x6570;&#x5B57;&#x3001;&#x767E;&#x5206;&#x6BD4;&#x3001;&#x989C;&#x8272;&#xFF08;17&#x4E2A;&#xFF09;<br>&#x5B89;&#x5168;&#x8272;<br>&#x7EDD;&#x5BF9;&#x957F;&#x5EA6;&#xFF1A;1in = 2.54cm = 25.4mm = 72pt = 6pc </p>
<blockquote>
<p>PAGE:92</p>
</blockquote>
<p>&#x76F8;&#x5BF9;&#x957F;&#x5EA6;&#xFF1A;</p>
<ul>
<li>em&#xFF1A;&#x76F8;&#x5BF9;&#x4E8E;&#x5B57;&#x4F53;&#x7684;&#x5EA6;&#x91CF;</li>
<li>px&#xFF1A;&#x5C4F;&#x5E55;&#x4E0A;&#x7684;&#x4E00;&#x4E2A;&#x70B9;&#xFF0C;&#x53D6;&#x51B3;&#x4E8E;&#x5206;&#x8FA8;&#x7387;</li>
</ul>
<p>&#x5F15;&#x5165;&#x8D44;&#x6E90;&#xFF1A;</p>
<ul>
<li>css&#x6587;&#x4EF6;&#x4E2D;&#x5F15;&#x5165;&#xFF1A;@import url(special/gif.gif);</li>
<li>html&#x4E2D; <code>&lt;link rel=&quot;stylesheet&quot; type =&quot;text/css&quot; href=&quot;path&quot;&gt;</code></li>
</ul>
<p>&#x5173;&#x952E;&#x5B57;</p>
<ul>
<li>inherit &#x7EE7;&#x627F;&#x7236;&#x5143;&#x7D20;&#x7684;&#x503C;</li>
</ul>
<h3 id="&#x5B57;&#x4F53;">&#x5B57;&#x4F53;</h3><ul>
<li>font-family:&#x2019;New York&#x2019;,Serify;</li>
<li>font-weight: //&#x7C97;&#x7EC6;</li>
<li>font-size: //&#x5927;&#x5C0F;<blockquote>
<p>PAGE 110</p>
</blockquote>
</li>
</ul>
<p>&#x7F29;&#x8FDB;&#xFF1A;</p>
<ul>
<li>text-indent:&#x7F29;&#x8FDB;</li>
<li>text-align:left|center|right|justify</li>
<li>line-height:<br><img src="http://ww4.sinaimg.cn/large/c048f998gw1ezczrob8hyj20ob05yt9t.jpg" alt="enter image description here"></li>
</ul>
<p>&#x5BF9;&#x9F50;&#xFF1A;<br>vertical-align: //&#x5E94;&#x7528;&#x4E8E;&#x884C;&#x5185;&#x5143;&#x7D20;&#x3001;&#x66FF;&#x6362;&#x5143;&#x7D20;</p>
<p>&#x6587;&#x672C;&#x5C5E;&#x6027;&#xFF1A;</p>
<ul>
<li>word-spacing://&#x5355;&#x8BCD;&#x95F4;&#x9694;</li>
<li>letter-spacing://&#x5B57;&#x6BCD;&#x95F4;&#x9694;</li>
<li>text-tranform://&#x5927;&#x5C0F;&#x5199;&#x8F6C;&#x6362;</li>
<li>text-decoration://&#x4FEE;&#x9970;</li>
<li>text-shadow://&#x9634;&#x5F71;</li>
<li>white-space</li>
<li>direction</li>
<li>unicode-bidi</li>
</ul>
<blockquote>
<p>PAGE 115</p>
</blockquote>

          
        
      
    </div>

    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>



    
      

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2015/12/22/attence_based_on_openwrt/" itemprop="url">
                  基于Openwrt的考勤
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">发表于</span>
            <time itemprop="dateCreated" datetime="2015-12-22T22:31:00+08:00" content="2015-12-22">
              2015-12-22
            </time>
          </span>

          
            <span class="post-category" >
              &nbsp; | &nbsp;
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="https://schema.org/Thing">
                  <a href="/categories/折腾/" itemprop="url" rel="index">
                    <span itemprop="name">折腾</span>
                  </a>
                </span>

                
                

              
            </span>
          

          
            
              <span class="post-comments-count">
                &nbsp; | &nbsp;
                <a href="/2015/12/22/attence_based_on_openwrt/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2015/12/22/attence_based_on_openwrt/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          

          
          
        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <p>&#x8BBE;&#x5907;&#xFF1A;wndr4300</p>
<h3 id="&#x8DEF;&#x7531;&#x7AEF;">&#x8DEF;&#x7531;&#x7AEF;</h3><h3 id="wndr4300">Wndr4300</h3><p>&#x529F;&#x80FD;&#xFF1A;&#x83B7;&#x53D6;&#x5F53;&#x524D;&#x8BBE;&#x5907;&#x5217;&#x8868;&#xFF0C;&#x5E76;&#x4E0A;&#x4F20;&#x5230;&#x670D;&#x52A1;&#x5668;</p>
<pre><code>cat /<span class="keyword">proc</span>/net/arp | grep <span class="number">0x2</span> &gt; /device.txt
curl -H <span class="string">&quot;Expect:&quot;</span> -F <span class="string">&quot;userfile=@/device.txt&quot;</span>  http://at.xuyu.club/attence
</code></pre><h3 id="&#x670D;&#x52A1;&#x5668;&#x7AEF;">&#x670D;&#x52A1;&#x5668;&#x7AEF;</h3><ol>
<li>Mac&#x5730;&#x5740;&#x4E0E;&#x4EBA;&#x5458;&#x7684;&#x7ED1;&#x5B9A;</li>
</ol>
<h3 id="&#x53EF;&#x80FD;&#x51FA;&#x73B0;&#x7684;&#x95EE;&#x9898;">&#x53EF;&#x80FD;&#x51FA;&#x73B0;&#x7684;&#x95EE;&#x9898;</h3><ol>
<li>&#x540C;&#x4E00;MAC&#x51FA;&#x73B0;&#x4E24;&#x6B21;&#x3002;&#x89E3;&#x51B3;&#x65B9;&#x6CD5;&#xFF1A;&#x5F55;&#x5165;&#x65F6;&#x53BB;&#x91CD;</li>
<li>&#x5728;&#x7EBF;&#x65F6;&#x95F4;&#x66F4;&#x65B0;&#x4E0D;&#x53CA;&#x65F6;&#x3002;<br>3.</li>
</ol>

          
        
      
    </div>

    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>



    
      

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2015/12/18/python-pysipder/" itemprop="url">
                  centos 下安装 pyspider
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">发表于</span>
            <time itemprop="dateCreated" datetime="2015-12-18T20:21:00+08:00" content="2015-12-18">
              2015-12-18
            </time>
          </span>

          
            <span class="post-category" >
              &nbsp; | &nbsp;
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="https://schema.org/Thing">
                  <a href="/categories/python/" itemprop="url" rel="index">
                    <span itemprop="name">python</span>
                  </a>
                </span>

                
                

              
            </span>
          

          
            
              <span class="post-comments-count">
                &nbsp; | &nbsp;
                <a href="/2015/12/18/python-pysipder/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2015/12/18/python-pysipder/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          

          
          
        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <h3 id="&#x5B89;&#x88C5;pip">&#x5B89;&#x88C5;PIP</h3><pre><code>wget http<span class="variable">s:</span>//bootstrap.pypa.io/<span class="built_in">get</span>-pip.<span class="keyword">py</span> --<span class="keyword">no</span>-check-certificate

<span class="keyword">python</span> <span class="built_in">get</span>-pip.<span class="keyword">py</span>
</code></pre><h3 id="&#x5B89;&#x88C5;&#x4F9D;&#x8D56;">&#x5B89;&#x88C5;&#x4F9D;&#x8D56;&#xFF1A;</h3><pre><code>yum <span class="operator"><span class="keyword">install</span> python-devel zlib-devel libxslt-devel  libxml2-dev

sudo pip <span class="keyword">install</span> -r requirements.txt

pip <span class="keyword">install</span> mysql-connector-python==<span class="number">2.0</span><span class="number">.4</span> <span class="comment">--allow-external mysql-connector-python</span>

<span class="keyword">Error</span>: pg_config executable <span class="keyword">not</span> <span class="keyword">found</span>.

pip <span class="keyword">install</span> mysql-connector-python==<span class="number">2.1</span><span class="number">.2</span> <span class="comment">--allow-external mysql-connector-python</span>

yum <span class="keyword">install</span> postgresql-devel</span>
</code></pre>
          
        
      
    </div>

    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>



    
      

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2015/12/12/php-zend-shortcut-key/" itemprop="url">
                  ZendStudio 常用快捷键
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">发表于</span>
            <time itemprop="dateCreated" datetime="2015-12-12T14:14:00+08:00" content="2015-12-12">
              2015-12-12
            </time>
          </span>

          
            <span class="post-category" >
              &nbsp; | &nbsp;
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="https://schema.org/Thing">
                  <a href="/categories/PHP/" itemprop="url" rel="index">
                    <span itemprop="name">PHP</span>
                  </a>
                </span>

                
                

              
            </span>
          

          
            
              <span class="post-comments-count">
                &nbsp; | &nbsp;
                <a href="/2015/12/12/php-zend-shortcut-key/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2015/12/12/php-zend-shortcut-key/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          

          
          
        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <h3 id="常用">常用</h3><p><strong><code>Ctrl + L</code>:, 输入行数: 转至行：打开一个对话框，允许您输入编辑器应该跳至的行号。仅适用于编辑器。输入行号，可以快速跳转到源文件中的第N行。<br><code>Ctrl + Q</code>:上一个编辑位置：显示上一个编辑操作的发生位置,返回到最近的修改位置。即使你查看不同的文件时，你也可以使用该快捷键来找到你最近对文件的修改位置。尤其是在文件比较大时，显得更为有用。<br><code>Ctrl + ./Ctrl +,</code>:在一个文件中快速定位到一个问题（如错误、警告等）</strong></p>
<h3 id="不常用">不常用</h3><p>**<code>Ctrl + Shift + T</code>:打开类型：显示”打开类型”对话框来在编辑器中打开类型。”打开类型”选择对话框显示工作空间中存在的所有类型如类、接口等。</p>
          <div class="post-more-link text-center">
            <a class="btn" href="/2015/12/12/php-zend-shortcut-key/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
        
      
    </div>

    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>



    
      

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2015/12/10/css-study/" itemprop="url">
                  前端常用
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">发表于</span>
            <time itemprop="dateCreated" datetime="2015-12-10T20:21:00+08:00" content="2015-12-10">
              2015-12-10
            </time>
          </span>

          
            <span class="post-category" >
              &nbsp; | &nbsp;
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="https://schema.org/Thing">
                  <a href="/categories/前端学习/" itemprop="url" rel="index">
                    <span itemprop="name">前端学习</span>
                  </a>
                </span>

                
                

              
            </span>
          

          
            
              <span class="post-comments-count">
                &nbsp; | &nbsp;
                <a href="/2015/12/10/css-study/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2015/12/10/css-study/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          

          
          
        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <h3 id="&#x7ED9;&#x6240;&#x6709;&#x56FE;&#x7247;&#x52A0;&#x70B9;&#x51FB;&#x4E8B;&#x4EF6;">&#x7ED9;&#x6240;&#x6709;&#x56FE;&#x7247;&#x52A0;&#x70B9;&#x51FB;&#x4E8B;&#x4EF6;</h3><pre><code><span class="function"><span class="keyword">function</span> <span class="title">AddImgClickEvent</span>(<span class="params"></span>)  
 </span>{  
     <span class="keyword">var</span> objs = <span class="built_in">document</span>.getElementsByTagName(<span class="string">&quot;img&quot;</span>);             
     <span class="keyword">for</span>(<span class="keyword">var</span> i=<span class="number">0</span>;i&lt;objs.length;i++)  
     {  
         objs[i].onclick=<span class="function"><span class="keyword">function</span>(<span class="params"></span>) 
         </span>{  
             alert(<span class="string">&apos;hello&apos;</span>);
             <span class="keyword">return</span> <span class="literal">false</span>;
         }  
         objs[i].style.cursor = <span class="string">&quot;pointer&quot;</span>;  
     }  
 }
</code></pre>
          
        
      
    </div>

    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>



    
      

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2015/12/06/Python_crawl/" itemprop="url">
                  python 爬取知乎
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">发表于</span>
            <time itemprop="dateCreated" datetime="2015-12-06T22:36:00+08:00" content="2015-12-06">
              2015-12-06
            </time>
          </span>

          
            <span class="post-category" >
              &nbsp; | &nbsp;
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="https://schema.org/Thing">
                  <a href="/categories/python/" itemprop="url" rel="index">
                    <span itemprop="name">python</span>
                  </a>
                </span>

                
                

              
            </span>
          

          
            
              <span class="post-comments-count">
                &nbsp; | &nbsp;
                <a href="/2015/12/06/Python_crawl/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2015/12/06/Python_crawl/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          

          
          
        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          
            <h3 id="&#x524D;&#x8A00;">&#x524D;&#x8A00;&#xFF1A;</h3><blockquote>
<p>&#x4E3A;&#x4E86;&#x5E2E;&#x90FD;&#x54E5;&#x89E3;&#x51B3;python &#x722C;&#x866B;&#x65F6;&#x9047;&#x5230;&#x7684;&#x95EE;&#x9898;&#xFF0C;&#x53C8;&#x590D;&#x4E60;&#x4E86;&#x4E0B;python&#xFF0C;&#x5E76;&#x4E14;&#x5C1D;&#x8BD5;&#x722C;&#x53D6;&#x4E86;&#x77E5;&#x4E4E;&#x9875;&#x9762;&#x3002; &#x5728;&#x8FD9;&#x91CC;&#x8BB0;&#x4E0B;&#x9047;&#x5230;&#x7684;&#x95EE;&#x9898;&#x3002;</p>
</blockquote>
<hr>
<h3 id="&#x8E29;&#x70B9;">&#x8E29;&#x70B9;</h3><p>&#x6B63;&#x5E38;&#x767B;&#x5F55;&#x4E00;&#x6B21; <a href="http://www.zhihu.com" target="_blank" rel="external">&#x77E5;&#x4E4E;</a> &#x5E76;&#x5728;Fiddler&#x9762;&#x677F;&#x67E5;&#x770B;&#x8BE6;&#x7EC6;&#x4FE1;&#x606F;</p>
<h4 id="fiddler&#x67E5;&#x770B;header">Fiddler&#x67E5;&#x770B;Header</h4><p>&#x83B7;&#x53D6;&#x8BF7;&#x6C42;&#x5185;&#x5BB9;</p>
<pre><code><span class="request">POST <span class="string">http://www.zhihu.com/login/email</span> HTTP/1.1</span>
<span class="attribute">Content-Type</span>: <span class="string">application/x-www-form-urlencoded; charset=UTF-8</span>
<span class="attribute">Accept</span>: <span class="string">*/*</span>
<span class="attribute">X-Requested-With</span>: <span class="string">XMLHttpRequest</span>
<span class="attribute">Referer</span>: <span class="string">http://www.zhihu.com/#signin</span>
<span class="attribute">Accept-Language</span>: <span class="string">zh-CN</span>
<span class="attribute">Accept-Encoding</span>: <span class="string">gzip, deflate</span>
<span class="attribute">User-Agent</span>: <span class="string">Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; .NET CLR 2.0.50727; .NET CLR 3.0.30729; .NET CLR 3.5.30729)</span>
<span class="attribute">Content-Length</span>: <span class="string">93</span>
<span class="attribute">Host</span>: <span class="string">www.zhihu.com</span>

<span class="bash">_xsrf=<span class="number">7150</span>c8e5d9ef17589681c80c276611ea&amp;password=<span class="built_in">test</span>&amp;captcha=<span class="number">5</span>SAK&amp;remember_me=<span class="literal">true</span>&amp;email=<span class="built_in">test</span></span>
</code></pre><h4 id="&#x5168;&#x5C40;&#x5171;&#x7528;cookie">&#x5168;&#x5C40;&#x5171;&#x7528;cookie</h4><pre><code>self<span class="class">.cookie</span> = cookielib.<span class="function"><span class="title">LWPCookieJar</span><span class="params">()</span></span>
#&#x8BBE;&#x7F6E;cookie&#x5904;&#x7406;&#x5668;
self<span class="class">.cookieHandler</span> = urllib2.<span class="function"><span class="title">HTTPCookieProcessor</span><span class="params">(self.cookie)</span></span>
#&#x8BBE;&#x7F6E;&#x767B;&#x5F55;&#x65F6;&#x7528;&#x5230;&#x7684;opener
self<span class="class">.opener</span> = urllib2.<span class="function"><span class="title">build_opener</span><span class="params">(self.cookieHandler,urllib2.HTTPHandler)</span></span>
urllib2.<span class="function"><span class="title">install_opener</span><span class="params">(self.opener)</span></span>
</code></pre><h3 id="&#x6A21;&#x62DF;&#x8BF7;&#x6C42;">&#x6A21;&#x62DF;&#x8BF7;&#x6C42;</h3><pre><code><span class="attribute">content</span> = urllib2.<span class="function"><span class="title">urlopen</span><span class="params">(<span class="string">&apos;http://www.zhihu.com/&apos;</span>)</span></span>
</code></pre><h4 id="&#x53D6;&#x51FA;&#x9690;&#x85CF;&#x5B57;&#x6BB5;xsrt">&#x53D6;&#x51FA;&#x9690;&#x85CF;&#x5B57;&#x6BB5;xsrt</h4><pre><code>xsrf = re.search(<span class="string">r&apos;(?&lt;=name=&quot;_xsrf&quot; value=&quot;)[^&quot;]*(?=&quot;/&gt;)&apos;</span>, content).group(<span class="number">0</span>);
</code></pre><h4 id="&#x8BF7;&#x6C42;&#x9A8C;&#x8BC1;&#x7801;">&#x8BF7;&#x6C42;&#x9A8C;&#x8BC1;&#x7801;</h4><pre><code><span class="attribute">content</span> = urllib2.<span class="function"><span class="title">urlopen</span><span class="params">(<span class="string">&apos;http://www.zhihu.com/&apos;</span>)</span></span>
</code></pre><h4 id="&#x6784;&#x9020;post&#x6570;&#x636E;">&#x6784;&#x9020;post&#x6570;&#x636E;</h4><pre><code><span class="setting">post_data = <span class="value">{<span class="string">&apos;_xsrf&apos;</span>: xsrf, <span class="string">&apos;email&apos;</span>: <span class="string">&apos;494046250@qq.com&apos;</span>,<span class="string">&apos;password&apos;</span>: <span class="string">&apos;8925159qz&apos;</span>, <span class="string">&apos;remember_me&apos;</span>: <span class="keyword">True</span>,<span class="string">&apos;captcha&apos;</span>: captcha}</span></span>
</code></pre><h4 id="&#x5C1D;&#x8BD5;&#x767B;&#x9646;">&#x5C1D;&#x8BD5;&#x767B;&#x9646;</h4><h4 id="unzip&#x767B;&#x9646;&#x7ED3;&#x679C;">unzip&#x767B;&#x9646;&#x7ED3;&#x679C;</h4><pre><code><span class="keyword">if</span> decode and <span class="string">&quot;gzip&quot;</span> <span class="keyword">in</span> decode:
        try:
            <span class="attribute">content</span> = zlib.<span class="function"><span class="title">decompress</span><span class="params">(content, <span class="number">16</span> + zlib.MAX_WBITS)</span></span>
        except zlib<span class="class">.error</span> as error:
            Debug<span class="class">.logger</span><span class="class">.info</span>(<span class="string">&apos;&#x89E3;&#x538B;&#x51FA;&#x9519;&apos;</span>)
            Debug<span class="class">.logger</span><span class="class">.info</span>(<span class="string">&apos;&#x9519;&#x8BEF;&#x4FE1;&#x606F;:{}&apos;</span>.<span class="function"><span class="title">format</span><span class="params">(error)</span></span>)
</code></pre><h4 id="&#x4FDD;&#x5B58;cookie&#x65B9;&#x4FBF;&#x4E0B;&#x6B21;&#x767B;&#x9646;">&#x4FDD;&#x5B58;cookie&#x65B9;&#x4FBF;&#x4E0B;&#x6B21;&#x767B;&#x9646;</h4><pre><code>zhihu_cookie = os.path.abspath(<span class="string">&apos;./&apos;</span>) + <span class="string">&apos;/zhihu_cookie_new_try.txt&apos;</span>
<span class="comment">#&#x4FDD;&#x5B58;cookie</span>
<span class="keyword">self</span>.cookie.save(zhihu_cookie);
<span class="comment">#&#x4F7F;&#x7528;cookie</span>
<span class="keyword">self</span>.cookie.load(zhihu_cookie)
</code></pre>
          
        
      
    </div>

    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>



    
      

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2015/12/06/php-summary/" itemprop="url">
                  PHP知识点
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">发表于</span>
            <time itemprop="dateCreated" datetime="2015-12-06T22:27:03+08:00" content="2015-12-06">
              2015-12-06
            </time>
          </span>

          
            <span class="post-category" >
              &nbsp; | &nbsp;
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="https://schema.org/Thing">
                  <a href="/categories/php/" itemprop="url" rel="index">
                    <span itemprop="name">php</span>
                  </a>
                </span>

                
                

              
            </span>
          

          
            
              <span class="post-comments-count">
                &nbsp; | &nbsp;
                <a href="/2015/12/06/php-summary/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2015/12/06/php-summary/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          

          
          
        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <h3 id="踩过的坑">踩过的坑</h3><h4 id="Using_$this_when_not_in_object_context_in"><code>Using $this when not in object context in</code></h4><p> 静态方法内无法使用$this,解决方法：</p>
<pre><code><span class="keyword">self</span>::<span class="function"><span class="keyword">method</span><span class="params">()</span>;</span>
</code></pre><p><a href="http://blog.csdn.net/yageeart/article/details/6662059">参考地址</a></p>
<h4 id="json_decode_时整形溢出，变为科学记数法">json_decode 时整形溢出，变为科学记数法</h4><p>solutions:</p>
<ol>
<li><code>json_decode($arr, TRUE, 512, JSON_BIGINT_AS_STRING)</code></li>
<li><code>preg_replace(&#39;/(&quot;\w+&quot;):(\d+)/&#39;, &#39;\\1:&quot;\\2&quot;&#39;, $resp)</code>  //适配老版PHP</li>
</ol>
<h3 id="小TIPS">小TIPS</h3><h4 id="获取物理路径">获取物理路径</h4><pre><code>realpath()<span class="comment">;</span>
</code></pre><h4 id="获取服务端、客户端IP">获取服务端、客户端IP</h4>
          <div class="post-more-link text-center">
            <a class="btn" href="/2015/12/06/php-summary/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
        
      
    </div>

    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>



    
      

  
  

  
  
  

  <article class="post post-type-normal " itemscope itemtype="http://schema.org/Article">

    
      <header class="post-header">

        
        
          <h1 class="post-title" itemprop="name headline">
            
            
              
                
                <a class="post-title-link" href="/2015/12/03/hexo-webhook-autodeploy/" itemprop="url">
                  Webhooks配合shell脚本自动部署Hexo博客到Github
                </a>
              
            
          </h1>
        

        <div class="post-meta">
          <span class="post-time">
            <span class="post-meta-item-icon">
              <i class="fa fa-calendar-o"></i>
            </span>
            <span class="post-meta-item-text">发表于</span>
            <time itemprop="dateCreated" datetime="2015-12-03T22:27:03+08:00" content="2015-12-03">
              2015-12-03
            </time>
          </span>

          
            <span class="post-category" >
              &nbsp; | &nbsp;
              <span class="post-meta-item-icon">
                <i class="fa fa-folder-o"></i>
              </span>
              <span class="post-meta-item-text">分类于</span>
              
                <span itemprop="about" itemscope itemtype="https://schema.org/Thing">
                  <a href="/categories/折腾/" itemprop="url" rel="index">
                    <span itemprop="name">折腾</span>
                  </a>
                </span>

                
                

              
            </span>
          

          
            
              <span class="post-comments-count">
                &nbsp; | &nbsp;
                <a href="/2015/12/03/hexo-webhook-autodeploy/#comments" itemprop="discussionUrl">
                  <span class="post-comments-count ds-thread-count" data-thread-key="2015/12/03/hexo-webhook-autodeploy/" itemprop="commentsCount"></span>
                </a>
              </span>
            
          

          

          
          
        </div>
      </header>
    


    <div class="post-body" itemprop="articleBody">

      
      

      
        
          <h3 id="理想中做记录的正确姿势">理想中做记录的正确姿势</h3><blockquote>
<p>打开 <a href="https://stackedit.io">Stackedit</a>或<a href="app.classeur.io">Classeur</a>，编辑好内容，点击保存，然后就一切就Ok。</p>
</blockquote>
<h3 id="然而">然而</h3><blockquote>
<p>Hexo没有后台编辑，如果想发表文章最基本的步骤是 <code>hexo new</code>创建文章后编辑新建的<code>xx.md</code> 文件，然后<code>hexo d -g</code> 部署。这在我看来一是不能随身携带，换电脑立马跪，二是操作繁琐。为什么不把这些重复的工作交给电脑，我只要开开心心编写笔记就好了呢？于是有了如下的折腾。</p>
</blockquote>
<hr>
<h2 id="方案1">方案1</h2><h3 id="Git">Git</h3><blockquote>
<p>创建Note项目存放markdown笔记，并且设置webhooks</p>
</blockquote>
          <div class="post-more-link text-center">
            <a class="btn" href="/2015/12/03/hexo-webhook-autodeploy/#more" rel="contents">
              阅读全文 &raquo;
            </a>
          </div>
        
      
    </div>

    <footer class="post-footer">
      

      

      
      
        <div class="post-eof"></div>
      
    </footer>
  </article>



    

  </section>

  
  <nav class="pagination">
    <span class="page-number current">1</span><a class="page-number" href="/page/2/">2</a><a class="extend next" rel="next" href="/page/2/"><i class="fa fa-angle-right"></i></a>
  </nav>



          </div>
          


          

        </div>
        
          
  
  <div class="sidebar-toggle">
    <div class="sidebar-toggle-line-wrap">
      <span class="sidebar-toggle-line sidebar-toggle-line-first"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-middle"></span>
      <span class="sidebar-toggle-line sidebar-toggle-line-last"></span>
    </div>
  </div>

  <aside id="sidebar" class="sidebar">
    <div class="sidebar-inner">

      

      

      <section class="site-overview sidebar-panel  sidebar-panel-active ">
        <div class="site-author motion-element" itemprop="author" itemscope itemtype="http://schema.org/Person">
          <img class="site-author-image" itemprop="image"
               src="http://ww4.sinaimg.cn/large/c048f998jw1ey8qmhh0pjj20g40ebjs7.jpg"
               alt="Fengit" />
          <p class="site-author-name" itemprop="name">Fengit</p>
          <p class="site-description motion-element" itemprop="description">在成为最厉害最厉害最厉害的道路上.</p>
        </div>
        <nav class="site-state motion-element">
          <div class="site-state-item site-state-posts">
            <a href="/archives">
              <span class="site-state-item-count">19</span>
              <span class="site-state-item-name">日志</span>
            </a>
          </div>

          <div class="site-state-item site-state-categories">
            <a href="/categories">
              <span class="site-state-item-count">9</span>
              <span class="site-state-item-name">分类</span>
              </a>
          </div>

          <div class="site-state-item site-state-tags">
          <a href="/tags">
              <span class="site-state-item-count">27</span>
              <span class="site-state-item-name">标签</span>

          </a>
          </div>

        </nav>

        
          <div class="feed-link motion-element">
            <a href="/atom.xml" rel="alternate">
              <i class="fa fa-rss"></i>
              RSS
            </a>
          </div>
        

        <div class="links-of-author motion-element">
          
            
              <span class="links-of-author-item">
                <a href="https://github.com/hmilyfyj" target="_blank">
                  
                    <i class="fa fa-github"></i> GitHub
                  
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://www.weibo.com/3226007960" target="_blank">
                  
                    <i class="fa fa-weibo"></i> Weibo
                  
                </a>
              </span>
            
              <span class="links-of-author-item">
                <a href="http://www.zhihu.com/people/feng-ying-jie" target="_blank">
                  
                    <i class="fa fa-globe"></i> zhihu
                  
                </a>
              </span>
            
          
        </div>

        
        

        <div class="links-of-author motion-element">
          
        </div>

      </section>

      

    </div>
  </aside>


        
      </div>
    </main>

    <footer id="footer" class="footer">
      <div class="footer-inner">
        <div class="copyright" >
  
  &copy;  2015 - 
  <span itemprop="copyrightYear">2016</span>
  <span class="with-love">
    <i class="icon-next-heart fa fa-heart"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">Fengit</span>
</div>

<div class="powered-by">
  由 <a class="theme-link" href="http://hexo.io">Hexo</a> 强力驱动
</div>

<div class="theme-info">
  主题 -
  <a class="theme-link" href="https://github.com/iissnan/hexo-theme-next">
    NexT.Pisces
  </a>
</div>



      </div>
    </footer>

    <div class="back-to-top"></div>
  </div>

  


  



  <script type="text/javascript" src="/vendors/jquery/index.js?v=2.1.3"></script>

  <script type="text/javascript" src="/vendors/fastclick/lib/fastclick.min.js?v=1.0.6"></script>

  <script type="text/javascript" src="/vendors/jquery_lazyload/jquery.lazyload.js?v=1.9.7"></script>

  <script type="text/javascript" src="/vendors/velocity/velocity.min.js"></script>

  <script type="text/javascript" src="/vendors/velocity/velocity.ui.min.js"></script>

  <script type="text/javascript" src="/vendors/fancybox/source/jquery.fancybox.pack.js"></script>


  


  <script type="text/javascript" src="/js/src/utils.js?v=5.0.0"></script>

  <script type="text/javascript" src="/js/src/motion.js?v=5.0.0"></script>



  
  


  <script type="text/javascript" src="/js/src/affix.js?v=5.0.0"></script>

  <script type="text/javascript" src="/js/src/schemes/pisces.js?v=5.0.0"></script>



  

  


  <script type="text/javascript" src="/js/src/bootstrap.js?v=5.0.0"></script>



  

  
    
  

  <script type="text/javascript">
    var duoshuoQuery = {short_name:"fenghexo"};
    (function() {
      var ds = document.createElement('script');
      ds.type = 'text/javascript';ds.async = true;
      ds.id = 'duoshuo-script';
      //ds.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + '//static.duoshuo.com/embed.js';
      ds.src = '/js/src/embed.js';
      ds.charset = 'UTF-8';
      (document.getElementsByTagName('head')[0]
      || document.getElementsByTagName('body')[0]).appendChild(ds);
    })();
  </script>

  
    
  






  
  

  
  

  <script type="text/javascript">

  $(document).ready(function(){
    var isMobile = navigator.userAgent.match(/iphone|android|phone|mobile|wap|netfront|x11|java|opera mobi|opera mini|ucweb|windows ce|symbian|symbianos|series|webos|sony|blackberry|dopod|nokia|samsung|palmsource|xda|pieplus|meizu|midp|cldc|motorola|foma|docomo|up.browser|up.link|blazer|helio|hosin|huawei|novarra|coolpad|webos|techfaith|palmsource|alcatel|amoi|ktouch|nexian|ericsson|philips|sagem|wellcom|bunjalloo|maui|smartphone|iemobile|spice|bird|zte-|longcos|pantech|gionee|portalmmm|jig browser|hiptop|benq|haier|^lct|320x320|240x320|176x220/i);
    isMobile = (isMobile != null);
  if (!isMobile) {
    $(function() {
        var $sidebar   = $("#sidebar"),
            $window    = $(window),
            $header    = $("#header-inner"),
            offset     = $sidebar.offset(),
            topPadding = 15;

        $window.scroll(function() {
            if ($window.scrollTop() > offset.top) {
              //console.log($window.scrollTop());
              //console.log(offset.top);
                $sidebar.stop().animate({
                    //marginTop: $window.scrollTop() - offset.top + topPadding
                    marginTop: $window.scrollTop()  + topPadding
                });
            } else {
                $sidebar.stop().animate({
                    marginTop: offset.top
                });
            }
        });

    });
    }
  });
  </script>

</body>
</html>
